package de.app.badresden;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;

public class SplashScreenActivity extends Activity {

	int WAITING_TIME = 2000;	
	
	@Override
	public void onCreate(Bundle savedInstanceState) {

		super.onCreate(savedInstanceState);
		setContentView(R.layout.splashscreen_layout);
		Thread splashThread = new Thread() {

			@Override
			public void run() {

				try {
					int waited = 0;
					while (waited < WAITING_TIME) {
						sleep(100);
						waited += 100;
					}
				}
				catch (InterruptedException e) {
					// do nothing
				}
				finally {
					finish();
					Intent i = new Intent();
					i.setClass(getApplicationContext(), StartScreenActivity.class);
					startActivity(i);
				}
			}
		};
		splashThread.start();
	}
}